package edu.sctu.zcy.month201506.day20150614.iotest;

import java.io.File;
import java.io.IOException;

/**
 * Created by user24 on 2015/6/14.
 */
public class BufferedReadDemo {

    public void creatFile(File file) {

        if(!file.exists()){
            file.mkdir();
        }
    }

    public File creatNewFile(String dir,String fileName)  {

        File file1 = new File(dir+fileName);
        if(!file1.exists()){

            try {
                file1.createNewFile();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return file1;
    }
}
